<?
require_once("cms/core/helper/bean/Abstract.php");
require_once("cms/contact/om/ContactPeer.php");

class PHP_CMS_View_Helper_Contacts extends AbstractList {

    public function contacts($form=null) {

        if($this->isInit)
            return $this;

        parent::init($form);

        $this->criteria->setDistinct();
        
        return $this;

    }


    /**
     * Define the propel peer we are going to use to list
     * page items.
     */
    public function getMethod() {
        return "doSelect";
    }


    /**
     * Define the propel peer we are going to use to list
     * page items.
     */
    public static function getPeer() {
        return new ContactPeer();
    }


    /**
     * Return the searchable fields for this list page.
     */
    public static function getFields() {
        return array(
            ContactPeer::FIRSTNAME,
            ContactPeer::SURNAME,
            ContactPeer::EMAIL,
            ContactPeer::PHONE,
            ContactPeer::OFFICE,
            ContactPeer::ROLE,
            ContactPeer::INSERT_DATE,
            ContactPeer::MODIFIED_DATE
        );
    }
}
?>